{extend name='admin@main'}
{block name="content"}
<div class="layui-card-body">
    <form  class="layui-form" action="{:request()->url()}" data-auto="true" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label label-required">用户账号</label>
            <div class="layui-input-block">
                <!--{if $vo and isset($vo.username)}-->
                <input disabled value='{$vo.username|default=""}' class="layui-input layui-bg-gray">
                <!--{else}-->
                <input name="username" value='' required placeholder="请输入学校名称作为账号" class="layui-input">
                <!--{/if}-->
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">密码</label>
            <div class="layui-input-block">
                <input type="password" name="password" value='' required placeholder="请输入密码" class="layui-input">
            </div>
        </div>
        <!--{if isset($authorizes)}-->
        <div class="layui-form-item">
            <label class="layui-form-label">访问授权</label>
            <div class="layui-input-block">
                {foreach $authorizes as $authorize}
                <label class="think-checkbox">
                    <!--{if in_array($authorize['id'],$vo['authorize'])}-->
                    <input type="checkbox" checked name="authorize[]" value="{$authorize.id}" lay-ignore> {$authorize.title}
                    <!--{else}-->
                    <input type="checkbox" name="authorize[]" value="{$authorize.id}" lay-ignore> {$authorize.title}
                    <!--{/if}-->
                </label>
                {/foreach}
                {if empty($authorizes)}<span class="color-desc" style="line-height:36px">未配置权限</span>{/if}
            </div>
        </div>
        <!--{/if}-->
        <div class="hr-line-dashed"></div>
        <div class="layui-form-item text-center">
            <!--{notempty name='school_id'}-->
            <input type='hidden' value='{$school_id}' name='school_id'>
            <!--{/notempty}-->
            <button type="submit" class="layui-btn layui-btn-normal">保 存</button>
            <button class="layui-btn layui-btn-danger" type='button'  onclick="window.history.back()">返 回</button>
        </div>

</form>
</div>
{/block}
{block name='script'}
<script>
    window.form.render();
</script>
{/block}